Struct member [ array vs pointer ]

Posted by Walidix on Stack Overflow See other posts from Stack Overflow or by Walidix
Published on 2010-04-09T21:08:58Z Indexed on 2010/04/09 21:13 UTC
Read the original article Hit count: 188

Filed under:

What is the benefit of declaring a C structure member as in array of size 1 instead of a pointer :

struct {
  a_struct_t a_member[1];
  ...
}b_struct;

Thanks in advance

© Stack Overflow or respective owner

Related posts about c